/* 🎯 极简风格的AI步骤编辑器样式 */

.simple-step-editor {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 📋 简洁头部 */
.editor-header-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.editor-header-simple h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-count {
  font-size: 12px;
  color: #666;
  background: #f5f5f5;
  padding: 4px 8px;
  border-radius: 12px;
}

.loading-indicator {
  font-size: 12px;
  color: #3b82f6;
  background: #eff6ff;
  padding: 4px 8px;
  border-radius: 12px;
  animation: pulse-blue 2s infinite;
}

.tools-count {
  font-size: 12px;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 8px;
  border-radius: 12px;
}

@keyframes pulse-blue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ⏳ 生成中状态 */
.generating-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: #666;
  font-size: 14px;
}

.dots {
  display: flex;
  gap: 4px;
}

.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  animation: bounce 1.4s infinite ease-in-out both;
}

.dots span:nth-child(2) { animation-delay: -0.16s; }
.dots span:nth-child(3) { animation-delay: -0.32s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* 📋 步骤列表 */
.steps-list-simple {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 🎯 步骤卡片 - 极简版 */
.simple-step-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.simple-step-card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 📝 步骤头部 */
.step-header-simple {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.step-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #f0f9ff;
  color: #3b82f6;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.step-icon {
  font-size: 16px;
}

/* 🔘 按钮样式 */
.edit-btn-simple, .save-btn-simple {
  padding: 4px 12px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.edit-btn-simple {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.edit-btn-simple:hover {
  background: #f1f5f9;
  color: #475569;
}

.save-btn-simple {
  background: #3b82f6;
  color: white;
}

.save-btn-simple:hover {
  background: #2563eb;
}

/* 📄 步骤内容 */
.step-content-simple {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 🏷️ 步骤标题 */
.step-title-simple {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}

.title-input-simple {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.title-input-simple:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* 🤖 AI执行描述 */
.ai-desc-simple {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fefce8;
  border-radius: 6px;
  border: 1px solid #fde047;
}

.ai-label {
  font-size: 14px;
  flex-shrink: 0;
}

.ai-text {
  font-size: 12px;
  color: #713f12;
  line-height: 1.4;
}

.ai-input-simple {
  flex: 1;
  padding: 2px 4px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #713f12;
}

.ai-input-simple:focus {
  outline: none;
}

/* 🔧 推荐工具 */
.tool-simple {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f0fdf4;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}

.tool-label {
  font-size: 14px;
  flex-shrink: 0;
}

.tool-text {
  font-size: 12px;
  color: #166534;
  font-weight: 500;
  flex: 1;
}

.tool-select-simple {
  flex: 1;
  padding: 2px 4px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #166534;
  font-weight: 500;
  min-width: 0; /* 允许收缩 */
}

.tool-select-simple:focus {
  outline: none;
}

.tool-select-simple:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 为长选项文本优化显示 */
.tool-select-simple option {
  font-size: 12px;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🎯 节点类型 */
.node-type-simple {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #fef2f2;
  border-radius: 6px;
  border: 1px solid #fecaca;
}

.node-label {
  font-size: 14px;
  flex-shrink: 0;
}

.node-text {
  font-size: 12px;
  color: #991b1b;
  font-weight: 500;
}

.node-select-simple {
  flex: 1;
  padding: 2px 4px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #991b1b;
  font-weight: 500;
}

.node-select-simple:focus {
  outline: none;
}

/* 📄 空状态 */
.empty-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #9ca3af;
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* 🎯 底部操作 */
.actions-simple {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.action-btn {
  flex: 1;
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn.secondary {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
  background: #f1f5f9;
  color: #475569;
}

.action-btn.primary {
  background: #10b981;
  color: white;
}

.action-btn.primary:hover {
  background: #059669;
}

/* 📱 响应式设计 */
@media (max-width: 768px) {
  .editor-header-simple {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .header-status {
    justify-content: center;
  }
  
  .steps-list-simple {
    padding: 12px;
  }
  
  .simple-step-card {
    padding: 12px;
  }
  
  .actions-simple {
    flex-direction: column;
    padding: 12px 16px;
  }
}

/* 🎨 滚动条样式 */
.steps-list-simple::-webkit-scrollbar {
  width: 4px;
}

.steps-list-simple::-webkit-scrollbar-track {
  background: transparent;
}

.steps-list-simple::-webkit-scrollbar-thumb {
  background: #e5e5e5;
  border-radius: 2px;
}

.steps-list-simple::-webkit-scrollbar-thumb:hover {
  background: #d0d0d0;
} 